<?php
/**
 * Created by PhpStorm.
 * User: 10037
 * Date: 2022/6/1
 * Time: 19:59
 */

namespace app\admin\model;


use think\Model;

class Speci extends Model
{
    protected $pk='id';

    public function addSpeci($data){
        $this->save($data);
    }

    public function selectSpeci($foodId){
        return $this->where('foodId','=',$foodId)->where('delete','=',0)->select();
    }

    public function deleteSpeci($id){
       $result=  $this->find($id);
       $result['delete']=1;
       $result->save();
    }
}